import * as React from "react";
import Secon from "./bModule";
import { AModule } from "./aModule";

interface AppProps {
    page:string
}

interface AppState {
  currentPage: string;
}

export class PageContainer extends React.Component<AppProps, AppState> {
  constructor(props: AppProps) {
    super(props);

    this.state = {
      currentPage: "aModule"
    };
  }

  render() {      
      if(this.props.page === 'aModule'){
          return (
              <div className="page-container">
                <AModule />
              </div>
          );
      } else if(this.props.page ==='bModule'){
            return (
                <div className="page-container">
                    <Secon />
                </div>
            );
      } else {
          return(
              <div>
                  这是一个错误页
              </div>
          )
      }
  }
}
